﻿#region 命名空间

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Configuration;
using System.Runtime.Serialization;
using System.Web;
using WinnerCMS.Common;

#endregion

namespace WinnerCMS.BLL
{
    public partial class CMSConfig
    {
        [Serializable, DataContract]
        public class FileWatcherConfig
        {
            public FileWatcherConfig()
            {
                WatchDir = "~/UpLoadFolder";
                PeCommand = 1;
                CsCommand = 1;
                IgnorePostfix = new List<string> {".html", ".htm", ".js"};
                MinSize = 10;
                MaxSize = 2097152;
                StartupFileWatch = true;
            }

            #region 是否启动实时监控

            /// <summary>
            /// 是否启动实时监控
            /// </summary>
            [DisplayName("是否启动实时监控"), DataMember]
            public bool StartupFileWatch { get; set; }

            #endregion

            /// <summary>
            /// 最大文件体积
            /// </summary>
            [DisplayName("最大文件体积"), DataMember]
            public int MaxSize { get; set; }


            /// <summary>
            /// 最小文件体积
            /// </summary>
            [DisplayName("最小文件体积"), DataMember]
            public int MinSize { get; set; }

            #region 监控目录

            /// <summary>
            /// 监控目录
            /// </summary>
            [DisplayName("监控目录"), DataMember]
            public string WatchDir { get; set; }

            #endregion

            #region 排除的文件格式

            /// <summary>
            /// 排除的文件格式
            /// </summary>
            [DisplayName("排除的文件格式"), DataMember]
            public List<string> IgnorePostfix { get; set; }

            #endregion

            /// <summary>
            ///  Code Scaner 发现木马以后的动作
            /// </summary>
            [DisplayName("Code Scaner 发现木马以后的动作"), DataMember]
            public int CsCommand { get; set; }


            /// <summary>
            ///  PE Scaner 发现木马以后的动作
            /// </summary>
            [DisplayName("PE Scaner 发现木马以后的动作"), DataMember]
            public int PeCommand { get; set; }
        }
    }
}